<!-- nav -->
<div th:fragment="header-nav">
  <header id="header">
    <div class="navbox">
      <h2 id="mnavh"><span class="navicon"></span></h2>
      <div class="logo"><a href="/cmsBlog/index.html">博客系统</a></div>
      <!--导航-->
      <nav>
        <ul id="starlist">
<!--          <li><a th:href="@{/blog/index.html}">首页</a></li>-->


<!--          <li class="wow fadeInLeft"  th:each="category:${@cms.selectNavCategories()}"  th:if="${category.parentId==null||category.parentId==0}">-->
<!--            <a th:href="${category.frontUrl}" class="in-nav"><span th:text="${category.categoryName}"></span></a>-->
<!--            <div class="sub-nav"  >-->
<!--              <a th:href="${childCategory.frontUrl}" th:each="childCategory:${@cms.selectNavCategories()}"  th:if="${childCategory.parentId==category.categoryId}"><span th:text="${childCategory.categoryName}"></span></a>-->
<!--            </div>-->
<!--          </li>-->

          <li th:class="${tree.children != null && tree.children.size() > 0} ? 'menu' : ''"  th:each="tree:${@blogService.listTree()}"  >
            <a th:href="${tree.url}" th:text="${tree.title}"></a>
            <ul class="sub" th:if="${tree.children != null && tree.children.size() > 0}">
              <li th:each="childTree:${tree.children}" >
                <a th:href="${childTree.url}" th:text="${childTree.title}"></a>
              </li>
            </ul>
            <span></span>
          </li>

          <li><a th:href="@{/cmsBlog/about.html}">关于我</a></li>
        </ul>
      </nav>
      <div class="user-login" id="notLogin">
          <a id="txtUserName" class="inputsub-zc"></a>
<!--          <a href="https://www.qingqingblog.com/e/member/cp/" target="_parent">会员中心</a>-->
          <a th:href="@{/cmsBlog/logout.html}" onclick="return confirm('确认要退出?');" class="inputsub-dl">退出</a>
      </div>
      <div class="user-login" style="display:none" id="login">
<!--          <div class="header-hello">您好，<span class="header-username">游客</span><span class="header-groupname"></span>-->
<!--        <input type="submit" name="Submit" value="登录" class="inputsub-dl">-->
        <a th:href="@{/cmsBlog/login.html}" class="inputsub-dl">登录</a>
        <a th:href="@{/cmsBlog/register.html}" class="inputsub-zc">注册</a>
      </div>
<!--      <div class="searchico"></div>-->
    </div>
  </header>


<!--  <div class="searchbox">-->
<!--    <div class="search">-->
<!--      <form action="/e/search/index.php" method="post" name="searchform" id="searchform">-->
<!--        <input name="keyboard" id="keyboard" class="input_text" value="请输入关键字词" style="color: rgb(153, 153, 153);" onFocus="if(value=='请输入关键字词'){this.style.color='#000';value=''}" onBlur="if(value==''){this.style.color='#999';value='请输入关键字词'}" type="text">-->
<!--        <input name="show" value="title" type="hidden">-->
<!--        <input name="tempid" value="1" type="hidden">-->
<!--        <input name="tbname" value="news" type="hidden">-->
<!--        <input name="Submit" class="input_submit" value="搜索" type="submit">-->
<!--      </form>-->
<!--    </div>-->
<!--    <div class="searchclose"></div>-->
<!--  </div>-->

</div>

<div th:fragment="footer">
  <footer>
    <div class="box">
<!--      <div class="wxbox">-->
<!--        <ul>-->
<!--          <li><img src="/skin/jxhx/images/wxgzh.jpg"><span>微信公众号</span></li>-->
<!--          <li><img src="/skin/jxhx/images/wx.png"><span>我的微信</span></li>-->
<!--        </ul>-->
<!--      </div>-->
      <div class="endnav">
<!--        <p><b>站点声明：</b></p>-->
<!--        <p>1、本站个人博客模板，均为杨青青本人设计，个人可以使用，但是未经许可不得用于任何商业目的。</p>-->
<!--        <p>2、所有文章未经授权禁止转载、摘编、复制或建立镜像，如有违反，追究法律责任。举报邮箱：<a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email=dacesmiling@qq.com" target="_blank">dacesmiling@qq.com</a></p>-->
<!--        <p>Copyright © <a href="http://www.usefullc.com" target="_blank">www.usefullc.com</a> All Rights Reserved. 备案号：<a href="http://www.miitbeian.gov.cn/" target="_blank">湘ICP备2021006309号-11</a></p>-->
                  <p>Copyright © <a href="http://www.usefullc.com" target="_blank">www.usefullc.com</a> All Rights Reserved. </p>
      </div>
    </div>
  </footer>
</div>

<div th:fragment="seo">
	<meta name="keywords" th:content="${keywords}">
	<meta name="description" th:content="${description}">
	<title th:text="${title}"></title>
</div>

<div th:fragment="header-res">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link th:href="@{/blog/css/base.css}" rel="stylesheet">
  <link th:href="@{/blog/css/m.css}" rel="stylesheet">
  <script th:src="@{/blog/js/jquery-1.8.3.min.js}" ></script>
  <script th:src="@{/blog/js/comm.js}"></script>
  <!--[if lt IE 9]>
  <script th:src="@{/blog/js/modernizr.js}"></script>
  <![endif]-->
    <script>
        $(document).ready(function(){
            var deviceId = new Date().getTime();
            //用户信息
            getUserInfo(deviceId);

        });

        function getUserInfo(){
            $.get("/user/c/getLoginUserInfo",function(res,status){
                if(res.success){
                    $("#notLogin").show();
                    $("#login").hide();
                    $("#txtUserName").text(res.data.userName+" 您好");
                }else{
                    $("#notLogin").hide();
                    $("#login").show();
                }
            });
        }
    </script>
</div>

<div th:fragment="content-right">

  <div class="rbox">

    <div class="whitebg paihang">
      <h2 class="htitle">点击排行</h2>
      <section class="topnews imgscale"><a><img  th:src="@{/blog/images/h1.jpg}"><span>生活要点点缀</span></a></section>
      <ul>
        <li th:each="dataItem:${@blogService.readList()}"><i></i><a th:href="${dataItem.url}" th:text="${dataItem.title}"></a></li>
      </ul>
    </div>

    <div class="whitebg tuijian">
      <h2 class="htitle">本栏推荐</h2>
      <section class="topnews imgscale"><a><img  th:src="@{/blog/images/h2.jpg}"><span>技术要走偏锋</span></a></section>
      <ul>
        <li th:each="dataItem:${@blogService.recommendList()}">
          <a th:href="${dataItem.url}"><i><img  th:src="${dataItem.imgUrl}"></i>
          <p th:text="${dataItem.title}"></p>
        </a>
        </li>

      </ul>
    </div>

<!--    <div class="ad whitebg imgscale">-->
<!--      <ul>-->
<!--        <a href="/"><img  th:src="@{/blog/images/ad.jpg}"></a>-->
<!--      </ul>-->
<!--    </div>-->

    <div class="whitebg cloud">
      <h2 class="htitle">标签云</h2>
      <ul>
        <a th:href="${'/cmsBlog/tag/'+dataItem.id+'.html'}" target="_blank" th:each="dataItem:${@blogService.tagList()}" th:text="${dataItem.name}"></a>
<!--        <a href="" target="_blank">css动画</a>-->
<!--        <a href="" target="_blank">布局</a>-->
<!--        <a href="" target="_blank">今夕何夕</a>-->
<!--        <a href="" target="_blank">SEO</a> <a href="" target="_blank">女程序员</a> <a href="" target="_blank">小世界</a> <a href="" target="_blank">个人博客</a> <a href="" target="_blank">网页设计</a>-->
      </ul>
    </div>

<!--    <div class="whitebg wenzi">-->
<!--      <h2 class="htitle">猜你喜欢</h2>-->
<!--      <ul>-->
<!--        <li><a href="/">十条设计原则教你学会如何设计网页布局!</a></li>-->
<!--        <li><a href="/">用js+css3来写一个手机栏目导航</a></li>-->
<!--        <li><a href="/">6条网页设计配色原则,让你秒变配色高手</a></li>-->
<!--        <li><a href="/">三步实现滚动条触动css动画效果</a></li>-->
<!--        <li><a href="/">个人博客，属于我的小世界！</a></li>-->
<!--        <li><a href="/">安静地做一个爱设计的女子</a></li>-->
<!--        <li><a href="/">个人网站做好了，百度不收录怎么办？来，看看他们怎么做的。</a></li>-->
<!--        <li><a href="/">做个人博客如何用帝国cms美化留言增加头像选择</a></li>-->
<!--      </ul>-->
<!--    </div>-->

<!--    <div class="ad whitebg imgscale">-->
<!--      <ul>-->
<!--        <a href="/"><img  th:src="@{/blog/images/ad02.jpg}"></a>-->
<!--      </ul>-->
<!--    </div>-->

<!--    <div class="whitebg tongji">-->
<!--      <h2 class="htitle">站点信息</h2>-->
<!--      <ul>-->
<!--        <li><b>建站时间</b>：2018-10-24</li>-->
<!--        <li><b>网站程序</b>：帝国cms</li>-->
<!--        <li><b>主题模板</b>：<a href="http://www.yangqq.com" target="_blank">《今夕何夕》</a></li>-->
<!--        <li><b>文章统计</b>：299条</li>-->
<!--        <li><b>文章评论</b>：490条</li>-->
<!--        <li><b>统计数据</b>：<a href="/">百度统计</a></li>-->
<!--      </ul>-->
<!--    </div>-->
  </div>
</div>

<div th:fragment="pager">
  <div id="pageGroup" class="pagelist" th:if="${pager.totalPage>1}">
    <span class="pageinfo">共&nbsp;<strong>[[${pager.totalPage}]]</strong>&nbsp;页<strong>[[${pager.total}]]</strong>&nbsp;条记录</span>
    <a th:href="${category.url}" th:class="${pager.pageIndex == 1 ? 'active':''}">首页</a>
<!--    <a th:if="${pager.pageIndex > 1}"  class="prepage nopage">上页</a>-->
    <a th:if="${pager.pageIndex > 2}" th:href="${category.urlPrefix}+'-'+${pager.pageIndex-1}+'.html'"  class="pagelist_active">上页</a>

    <a th:if="${pager.totalPage>2}"  th:each="item:${#numbers.sequence(2,pager.totalPage-1)}" th:href="${category.urlPrefix}+'-'+${item}+'.html'" class="listpage" th:text="${item}" th:class="${pager.pageIndex == item ? 'active':''}"></a>

    <a th:if="${pager.pageIndex < pager.totalPage -1}" th:href="${category.urlPrefix}+'-'+${pager.pageIndex+1}+'.html'"  class="nextpage">下页</a>
<!--    <a th:if="${pager.pageIndex == pager.totalPage}" class="nextpage nopage">下页</a>-->
    <a th:href="${category.urlPrefix}+'-'+${pager.totalPage}+'.html'"  th:class="${pager.pageIndex == pager.totalPage ? 'active':''}">尾页</a>
  </div>
</div>
